package Figuras;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.geom.Point2D;

public abstract class Figura {

    private Color colorDelBorde;
    private Point2D inicioDeLaFigura;
    private int grosorDelBordeDeLaFigura;

    public Figura() {
        fijarElInicioDeLaFigura(new Point2D.Double(0, 0));
        fijarElColorDelBorde(Color.BLACK);
        fijarElGrosorDelBordeDeLaFigura(1);
    }

    public Figura(Point2D puntoDeInicio, Color colorDelBorde, int grosorDelBorde) {
        fijarElInicioDeLaFigura(puntoDeInicio);
        fijarElColorDelBorde(colorDelBorde);
        fijarElGrosorDelBordeDeLaFigura(grosorDelBorde);
    }

    public Figura(int x, int y, Color colorDelBorde, int grosorDelBorde) {
        fijarElInicioDeLaFigura(x, y);
        fijarElColorDelBorde(colorDelBorde);
        fijarElGrosorDelBordeDeLaFigura(grosorDelBorde);
    }

    public final Color dameElColorDelBorde() {
        return colorDelBorde;
    }

    public final void fijarElColorDelBorde(Color ColorDelBorde) {
        this.colorDelBorde = ColorDelBorde;
    }

    public final Point2D dameElInicioDeLaFigura() {
        return inicioDeLaFigura;
    }

    public final void fijarElInicioDeLaFigura(Point2D inicioDeLaFigura) {
        this.inicioDeLaFigura = inicioDeLaFigura;
    }

    public final void fijarElInicioDeLaFigura(int coordenadaX, int coordenadaY) {
        Point2D inicioDeCoordenadasDeLaFigura = new Point2D.Double(coordenadaX, coordenadaY);
        this.inicioDeLaFigura = inicioDeCoordenadasDeLaFigura;
    }

    public final int dameElGrosorDelBordeDeLaFigura() {
        return grosorDelBordeDeLaFigura;
    }

    public final void fijarElGrosorDelBordeDeLaFigura(int grosorDelBorde) {
        this.grosorDelBordeDeLaFigura = grosorDelBorde;
    }

    public void dibujarLaFigura(Graphics dibujar) {
    }

    public abstract boolean estaDentroDelAreaDeDibujo(int coordenadaX, int coordenadaY);

    public abstract void fijarPosicionDeLaFigura(int coordenadaX, int coordenadaY);
}
